package com.ruoyi.hr.mapper;


import com.ruoyi.hr.domain.Authority;
import com.ruoyi.hr.domain.Departments;
import com.ruoyi.system.domain.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AuthorityMapper {

    List<Authority> getAuthority();

    /**
     * 获取一个用户的权限
     * @param userID
     * @return
     */
    List<Authority> getAuthorityUser(String userID);

    List<String> getDepAuthority(List<Authority> authorities);

    String getCompName(Integer compId);

    String getDepName(Authority authority);

    String getDepId(Authority authority);

    int insertAuthority(Authority authority);

    int deleteAuthority(@Param("ids") String ids);

    Authority getAuthorityId(String id);

    List<Departments> getDepList(@Param("depIds") String depIds);

    int updateAuthority(Authority authority);

    List<SysUser> getUserList();

    String getSubordinateCompId(int compId);

    int setUpAdmin(Authority authority);

    int findAuthorityCount(String userId);


}
